import axios from '@/common/config/axiosConfig'
import qs from 'qs'

export const todayData = (params) => {
  return axios.get('/api/v1/settlement/todayData', {
    params,
    paramsSerializer: function (data) {
      return qs.stringify(data)
    }
  })
}
export const queryByPageByBatchNo = (params) => {
  return axios.get('/api/v1/settlement/queryByPageByBatchNo', {
    params,
    paramsSerializer: function (data) {
      return qs.stringify(data)
    }
  })
}
export const queryPageList = (params) => {
  return axios.get('/api/v1/settlement/queryByPage', {
    params,
    paramsSerializer: function (data) {
      return qs.stringify(data)
    }
  })
}
export const submitRepay = (data) => {
  return axios.post('/api/v1/settlement/submitRepay', data, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}
export const profitSharingSubmit = (data) => {
  return axios.post('/api/v1/settlement/profitSharingSubmit', data)
}

export const exportWithdraw = (data) => {
  return axios.post('/api/v1/settlement/exportWithdraw', data, { responseType: 'blob' })
}
